<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- qopenglframebufferobject.cpp -->
  <title>QOpenGLFramebufferObjectFormat Class | Qt GUI 5.14.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.14</a></td><td ><a href="qtgui-index.html">Qt GUI</a></td><td ><a href="qtgui-module.html">C++ Classes</a></td><td >QOpenGLFramebufferObjectFormat</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtgui-index.html">Qt 5.14.2 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QOpenGLFramebufferObjectFormat Class</h1>
<!-- $$$QOpenGLFramebufferObjectFormat-brief -->
<p>The QOpenGLFramebufferObjectFormat class specifies the format of an OpenGL framebuffer object. <a href="#details">More...</a></p>
<!-- @@@QOpenGLFramebufferObjectFormat -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QOpenGLFramebufferObjectFormat&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += gui</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.0</td></tr></table></div><p>This class was introduced in Qt 5.0.</p>
<ul>
<li><a href="qopenglframebufferobjectformat-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#QOpenGLFramebufferObjectFormat-1">QOpenGLFramebufferObjectFormat</a></b>(const QOpenGLFramebufferObjectFormat &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#QOpenGLFramebufferObjectFormat">QOpenGLFramebufferObjectFormat</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QOpenGLFramebufferObjectFormat &amp;</td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#operator-eq">operator=</a></b>(const QOpenGLFramebufferObjectFormat &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#dtor.QOpenGLFramebufferObjectFormat">~QOpenGLFramebufferObjectFormat</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QOpenGLFramebufferObject::Attachment </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#attachment">attachment</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> GLenum </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#internalTextureFormat">internalTextureFormat</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#mipmap">mipmap</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#samples">samples</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#setAttachment">setAttachment</a></b>(QOpenGLFramebufferObject::Attachment <i>attachment</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#setInternalTextureFormat">setInternalTextureFormat</a></b>(GLenum <i>internalTextureFormat</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#setMipmap">setMipmap</a></b>(bool <i>enabled</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#setSamples">setSamples</a></b>(int <i>samples</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#setTextureTarget">setTextureTarget</a></b>(GLenum <i>target</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> GLenum </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#textureTarget">textureTarget</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#operator-not-eq">operator!=</a></b>(const QOpenGLFramebufferObjectFormat &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qopenglframebufferobjectformat.html#operator-eq-eq">operator==</a></b>(const QOpenGLFramebufferObjectFormat &amp;<i>other</i>) const</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QOpenGLFramebufferObjectFormat-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>A framebuffer object has several characteristics:</p>
<ul>
<li><a href="qopenglframebufferobjectformat.html#setSamples">Number of samples per pixels.</a></li>
<li><a href="qopenglframebufferobjectformat.html#setAttachment">Depth and/or stencil attachments.</a></li>
<li><a href="qopenglframebufferobjectformat.html#setTextureTarget">Texture target.</a></li>
<li><a href="qopenglframebufferobjectformat.html#setInternalTextureFormat">Internal texture format.</a></li>
</ul>
<p>Note that the desired attachments or number of samples per pixels might not be supported by the hardware driver. Call <a href="qopenglframebufferobject.html#format">QOpenGLFramebufferObject::format</a>() after creating a <a href="qopenglframebufferobject.html">QOpenGLFramebufferObject</a> to find the exact format that was used to create the frame buffer object.</p>
</div>
<p><b>See also </b><a href="qopenglframebufferobject.html">QOpenGLFramebufferObject</a>.</p>
<!-- @@@QOpenGLFramebufferObjectFormat -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QOpenGLFramebufferObjectFormat$$$QOpenGLFramebufferObjectFormatconstQOpenGLFramebufferObjectFormat& -->
<h3 class="fn" id="QOpenGLFramebufferObjectFormat-1"><a name="QOpenGLFramebufferObjectFormat-1"></a>QOpenGLFramebufferObjectFormat::<span class="name">QOpenGLFramebufferObjectFormat</span>(const <span class="type"><a href="qopenglframebufferobjectformat.html#QOpenGLFramebufferObjectFormat">QOpenGLFramebufferObjectFormat</a></span> &amp;<i>other</i>)</h3>
<p>Constructs a copy of <i>other</i>.</p>
<!-- @@@QOpenGLFramebufferObjectFormat -->
<!-- $$$QOpenGLFramebufferObjectFormat[overload1]$$$QOpenGLFramebufferObjectFormat -->
<h3 class="fn" id="QOpenGLFramebufferObjectFormat"><a name="QOpenGLFramebufferObjectFormat"></a>QOpenGLFramebufferObjectFormat::<span class="name">QOpenGLFramebufferObjectFormat</span>()</h3>
<p>Creates a QOpenGLFramebufferObjectFormat object for specifying the format of an OpenGL framebuffer object.</p>
<p>By default the format specifies a non-multisample framebuffer object with no depth/stencil attachments, texture target <code>GL_TEXTURE_2D</code>, and internal format <code>GL_RGBA8</code>. On OpenGL/ES systems, the default internal format is <code>GL_RGBA</code>.</p>
<p><b>See also </b><a href="qopenglframebufferobjectformat.html#samples">samples</a>(), <a href="qopenglframebufferobjectformat.html#attachment">attachment</a>(), and <a href="qopenglframebufferobjectformat.html#internalTextureFormat">internalTextureFormat</a>().</p>
<!-- @@@QOpenGLFramebufferObjectFormat -->
<!-- $$$operator=[overload1]$$$operator=constQOpenGLFramebufferObjectFormat& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qopenglframebufferobjectformat.html#QOpenGLFramebufferObjectFormat">QOpenGLFramebufferObjectFormat</a></span> &amp;QOpenGLFramebufferObjectFormat::<span class="name">operator=</span>(const <span class="type"><a href="qopenglframebufferobjectformat.html#QOpenGLFramebufferObjectFormat">QOpenGLFramebufferObjectFormat</a></span> &amp;<i>other</i>)</h3>
<p>Assigns <i>other</i> to this object.</p>
<!-- @@@operator= -->
<!-- $$$~QOpenGLFramebufferObjectFormat[overload1]$$$~QOpenGLFramebufferObjectFormat -->
<h3 class="fn" id="dtor.QOpenGLFramebufferObjectFormat"><a name="dtor.QOpenGLFramebufferObjectFormat"></a>QOpenGLFramebufferObjectFormat::<span class="name">~QOpenGLFramebufferObjectFormat</span>()</h3>
<p>Destroys the <a href="qopenglframebufferobjectformat.html">QOpenGLFramebufferObjectFormat</a>.</p>
<!-- @@@~QOpenGLFramebufferObjectFormat -->
<!-- $$$attachment[overload1]$$$attachment -->
<h3 class="fn" id="attachment"><a name="attachment"></a><span class="type"><a href="qopenglframebufferobject.html#Attachment-enum">QOpenGLFramebufferObject::Attachment</a></span> QOpenGLFramebufferObjectFormat::<span class="name">attachment</span>() const</h3>
<p>Returns the configuration of the depth and stencil buffers attached to a framebuffer object. The default is <a href="qopenglframebufferobject.html#Attachment-enum">QOpenGLFramebufferObject::NoAttachment</a>.</p>
<p><b>See also </b><a href="qopenglframebufferobjectformat.html#setAttachment">setAttachment</a>().</p>
<!-- @@@attachment -->
<!-- $$$internalTextureFormat[overload1]$$$internalTextureFormat -->
<h3 class="fn" id="internalTextureFormat"><a name="internalTextureFormat"></a><span class="type">GLenum</span> QOpenGLFramebufferObjectFormat::<span class="name">internalTextureFormat</span>() const</h3>
<p>Returns the internal format of a framebuffer object's texture or multisample framebuffer object's color buffer. The default is <code>GL_RGBA8</code> on desktop OpenGL systems, and <code>GL_RGBA</code> on OpenGL/ES systems.</p>
<p><b>See also </b><a href="qopenglframebufferobjectformat.html#setInternalTextureFormat">setInternalTextureFormat</a>().</p>
<!-- @@@internalTextureFormat -->
<!-- $$$mipmap[overload1]$$$mipmap -->
<h3 class="fn" id="mipmap"><a name="mipmap"></a><span class="type">bool</span> QOpenGLFramebufferObjectFormat::<span class="name">mipmap</span>() const</h3>
<p>Returns <code>true</code> if mipmapping is enabled.</p>
<p><b>See also </b><a href="qopenglframebufferobjectformat.html#setMipmap">setMipmap</a>().</p>
<!-- @@@mipmap -->
<!-- $$$samples[overload1]$$$samples -->
<h3 class="fn" id="samples"><a name="samples"></a><span class="type">int</span> QOpenGLFramebufferObjectFormat::<span class="name">samples</span>() const</h3>
<p>Returns the number of samples per pixel if a framebuffer object is a multisample framebuffer object. Otherwise, returns 0. The default value is 0.</p>
<p><b>See also </b><a href="qopenglframebufferobjectformat.html#setSamples">setSamples</a>().</p>
<!-- @@@samples -->
<!-- $$$setAttachment[overload1]$$$setAttachmentQOpenGLFramebufferObject::Attachment -->
<h3 class="fn" id="setAttachment"><a name="setAttachment"></a><span class="type">void</span> QOpenGLFramebufferObjectFormat::<span class="name">setAttachment</span>(<span class="type"><a href="qopenglframebufferobject.html#Attachment-enum">QOpenGLFramebufferObject::Attachment</a></span> <i>attachment</i>)</h3>
<p>Sets the attachment configuration of a framebuffer object to <i>attachment</i>.</p>
<p><b>See also </b><a href="qopenglframebufferobjectformat.html#attachment">attachment</a>().</p>
<!-- @@@setAttachment -->
<!-- $$$setInternalTextureFormat[overload1]$$$setInternalTextureFormatGLenum -->
<h3 class="fn" id="setInternalTextureFormat"><a name="setInternalTextureFormat"></a><span class="type">void</span> QOpenGLFramebufferObjectFormat::<span class="name">setInternalTextureFormat</span>(<span class="type">GLenum</span> <i>internalTextureFormat</i>)</h3>
<p>Sets the internal format of a framebuffer object's texture or multisample framebuffer object's color buffer to <i>internalTextureFormat</i>.</p>
<p><b>See also </b><a href="qopenglframebufferobjectformat.html#internalTextureFormat">internalTextureFormat</a>().</p>
<!-- @@@setInternalTextureFormat -->
<!-- $$$setMipmap[overload1]$$$setMipmapbool -->
<h3 class="fn" id="setMipmap"><a name="setMipmap"></a><span class="type">void</span> QOpenGLFramebufferObjectFormat::<span class="name">setMipmap</span>(<span class="type">bool</span> <i>enabled</i>)</h3>
<p>Enables mipmapping if <i>enabled</i> is true; otherwise disables it.</p>
<p>Mipmapping is disabled by default.</p>
<p>If mipmapping is enabled, additional memory will be allocated for the mipmap levels. The mipmap levels can be updated by binding the texture and calling glGenerateMipmap(). Mipmapping cannot be enabled for multisampled framebuffer objects.</p>
<p><b>See also </b><a href="qopenglframebufferobjectformat.html#mipmap">mipmap</a>() and <a href="qopenglframebufferobject.html#texture">QOpenGLFramebufferObject::texture</a>().</p>
<!-- @@@setMipmap -->
<!-- $$$setSamples[overload1]$$$setSamplesint -->
<h3 class="fn" id="setSamples"><a name="setSamples"></a><span class="type">void</span> QOpenGLFramebufferObjectFormat::<span class="name">setSamples</span>(<span class="type">int</span> <i>samples</i>)</h3>
<p>Sets the number of samples per pixel for a multisample framebuffer object to <i>samples</i>. The default sample count of 0 represents a regular non-multisample framebuffer object.</p>
<p>If the desired amount of samples per pixel is not supported by the hardware then the maximum number of samples per pixel will be used. Note that multisample framebuffer objects cannot be bound as textures. Also, the <code>GL_EXT_framebuffer_multisample</code> extension is required to create a framebuffer with more than one sample per pixel.</p>
<p><b>See also </b><a href="qopenglframebufferobjectformat.html#samples">samples</a>().</p>
<!-- @@@setSamples -->
<!-- $$$setTextureTarget[overload1]$$$setTextureTargetGLenum -->
<h3 class="fn" id="setTextureTarget"><a name="setTextureTarget"></a><span class="type">void</span> QOpenGLFramebufferObjectFormat::<span class="name">setTextureTarget</span>(<span class="type">GLenum</span> <i>target</i>)</h3>
<p>Sets the texture target of the texture attached to a framebuffer object to <i>target</i>. Ignored for multisample framebuffer objects.</p>
<p><b>See also </b><a href="qopenglframebufferobjectformat.html#textureTarget">textureTarget</a>() and <a href="qopenglframebufferobjectformat.html#samples">samples</a>().</p>
<!-- @@@setTextureTarget -->
<!-- $$$textureTarget[overload1]$$$textureTarget -->
<h3 class="fn" id="textureTarget"><a name="textureTarget"></a><span class="type">GLenum</span> QOpenGLFramebufferObjectFormat::<span class="name">textureTarget</span>() const</h3>
<p>Returns the texture target of the texture attached to a framebuffer object. Ignored for multisample framebuffer objects. The default is <code>GL_TEXTURE_2D</code>.</p>
<p><b>See also </b><a href="qopenglframebufferobjectformat.html#setTextureTarget">setTextureTarget</a>() and <a href="qopenglframebufferobjectformat.html#samples">samples</a>().</p>
<!-- @@@textureTarget -->
<!-- $$$operator!=[overload1]$$$operator!=constQOpenGLFramebufferObjectFormat& -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QOpenGLFramebufferObjectFormat::<span class="name">operator!=</span>(const <span class="type"><a href="qopenglframebufferobjectformat.html#QOpenGLFramebufferObjectFormat">QOpenGLFramebufferObjectFormat</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>false</code> if all the options of this framebuffer object format are the same as <i>other</i>; otherwise returns <code>true</code>.</p>
<!-- @@@operator!= -->
<!-- $$$operator==[overload1]$$$operator==constQOpenGLFramebufferObjectFormat& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QOpenGLFramebufferObjectFormat::<span class="name">operator==</span>(const <span class="type"><a href="qopenglframebufferobjectformat.html#QOpenGLFramebufferObjectFormat">QOpenGLFramebufferObjectFormat</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if all the options of this framebuffer object format are the same as <i>other</i>; otherwise returns <code>false</code>.</p>
<!-- @@@operator== -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2020 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
